package com.shop.mapper;


import com.shop.model.User;
import com.shop.model.common.SearchPage;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


public interface UserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);
    int changePhone(String newPhone, Integer id);

    int getChangPassword(Long id, String password);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByPhone(String phone);

    User selectByEmail(String email);

    List<User> searchPage(SearchPage searchPage);

    Integer searchCount(SearchPage searchPage);

    void userFreeze(Integer id,Integer status);
}
